Teacher Version

Hero Image
Hero Image

Color Sensor Comparison

Instructions

The If/Else Conditional Block can use other sensors to make its decision as well!

Virtual Robot: ColorComparisonVR.rbg

Physical Robot: ColorComparison.rbg

Change the If/Else conditional block to use the color value of the Color Sensor.

Put colored cards or different colored objects in front of the Color Sensor each time you run the program.

Program the robot to turn right if it sees green and left if it sees any other color. The robot only needs to do this once per run using the color it sees as soon as the program starts.

Quick Tips

ClosedClick here to reveal some hints to help complete this challenge

To program the robot to make decision based on whether the object is green or not, set your If/Else block to detect the color green.

© 2016 Robomatter, Inc.

Portions of this product are manufactured under license from Carnegie Mellon University.